Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
How do I pass an i18n value to a function through a "click" event?

I can't provide much example code. I'm unable to paste the code I'm working with for reasons of confidentiality, and I'm too new to Angular to be able to produce a minimum working example.

I have a button with a click element and an i18n element:

<button type="button"
    (click)="myFunction('temporaryValue')"
    i18n="@@nonEnglishText">
        English Text
</button>

What I aim to do is replace temporaryValue in the click element with the value of i18n, but I don't know how to achieve this. I tried the following method, but it sends the string itself instead of the value it's supposed to refer to:

(click)="myFunction('@@nonEnglishText')"

I also tried the following method, but it doesn't work:

i18n-(click)="myFunction('@@nonEnglishText')"

How do I achieve sending the correct value to the function?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can't ,you have to translate the temporaryValue somewhere else , where do you store-it or how do you get the value ?

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!